﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using HP.Cachalote.WPF.Shared;

namespace HP.Cachalote.WPF.UserControls
{
    /// <summary>
    /// Interaction logic for SystemButtonUserControl.xaml
    /// </summary>
    public partial class SystemButtonUserControl : UserControlBase
    {
        public static readonly DependencyProperty ShowMinimizeButtonProperty = 
            DependencyProperty.Register("ShowMinimizeButton", typeof(bool), typeof(SystemButtonUserControl));

        public bool ShowMinimizeButton
        {
            get 
            { 
                return (bool)GetValue(ShowMinimizeButtonProperty); 
            }
            set 
            { 
                SetValue(ShowMinimizeButtonProperty, value); 
            }
        }

        public SystemButtonUserControl()
        {
            InitializeComponent();
        }

        private void BtnClose_Click(object sender, RoutedEventArgs e)
        {
            //Close();
        }

        private void BtnRestore_Click(object sender, RoutedEventArgs e)
        {
            //WindowState = WindowState.Normal;
        }

        private void BtnMinimize_Click(object sender, RoutedEventArgs e)
        {
            //WindowState = WindowState.Minimized;
        }

        private void BtnMaximize_Click(object sender, RoutedEventArgs e)
        {
            //WindowState = WindowState.Maximized;
        }

        private void Window_StateChanged(object sender, EventArgs e)
        {
            //BtnRestore.Visibility = WindowState == WindowState.Maximized ? Visibility.Visible : Visibility.Hidden;
            //BtnMaximize.Visibility = WindowState == WindowState.Maximized ? Visibility.Hidden : Visibility.Visible;
        }
    }
}
